import 'dart:convert';
import 'package:demo_xm/generated/json/base/json_field.dart';
import 'package:demo_xm/generated/json/test_bean_entity.g.dart';

@JsonSerializable()
class TestBeanEntity {

	late int code;
	late TestBeanData data;
  
  TestBeanEntity();

  factory TestBeanEntity.fromJson(Map<String, dynamic> json) => $TestBeanEntityFromJson(json);

  Map<String, dynamic> toJson() => $TestBeanEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class TestBeanData {

	late String name;
	late List<TestBeanDataTag> tag;
  
  TestBeanData();

  factory TestBeanData.fromJson(Map<String, dynamic> json) => $TestBeanDataFromJson(json);

  Map<String, dynamic> toJson() => $TestBeanDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class TestBeanDataTag {

	late String name;
	late int type;
  
  TestBeanDataTag();

  factory TestBeanDataTag.fromJson(Map<String, dynamic> json) => $TestBeanDataTagFromJson(json);

  Map<String, dynamic> toJson() => $TestBeanDataTagToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}